<?php
/**
 * Sharing Controller for Sharing World Component
 * 
 * @package    Joomla.Tutorials
 * @subpackage Components
 * @link http://docs.joomla.org/Developing_a_Model-View-Controller_Component_-_Part_4
 * @license		GNU/GPL
 */

// No direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
jimport('joomla.application.component.controllerform');

/**
 * Sharing Sharing Controller
 *
 * @package    Joomla.Tutorials
 * @subpackage Components
 */
class CongregationControllerProvince extends JControllerForm
{
	/**
	 * constructor (registers additional tasks to methods)
	 * @return void
	 */
	function CongregationControllerProvince()
	{
		require_once JPATH_COMPONENT.'/helpers/congregation.php';
		parent::__construct();


	}
	/**
	 * Method to run batch operations.
	 *
	 * @param   object  $model  The model.
	 *
	 * @return  boolean	 True if successful, false otherwise and internal error is set.
	 *
	 * @since   1.7
	 */
	public function batch($model = null)
	{
		JRequest::checkToken() or jexit(JText::_('JINVALID_TOKEN'));

		// Set the model
		$model = $this->getModel('Province', '', array());

		// Preset the redirect
		$this->setRedirect(JRoute::_('index.php?option=com_congregation&view=provinces' . $this->getRedirectToListAppend(), false));

		return parent::batch($model);
	}	
}